CONFIG += c++11

defineReplace(qtLibraryTargetName) {
   unset(LIBRARY_NAME)
   LIBRARY_NAME = $$1
   CONFIG(debug, debug|release) {
      !debug_and_release|build_pass {
          mac:RET = $$member(LIBRARY_NAME, 0)_debug
              else:win32:RET = $$member(LIBRARY_NAME, 0)d
      }
   }
   isEmpty(RET):RET = $$LIBRARY_NAME
   return($$RET)
}

defineReplace(qtLibraryName) {
   RET = $$qtLibraryTargetName($$1)
   win32 {
      VERSION_LIST = $$split(QTCREATOR_VERSION, .)
      RET = $$RET$$first(VERSION_LIST)
   }
   return($$RET)
}

APP_SOURCE_TREE = $$PWD
isEmpty(APP_BUILD_TREE) {
    sub_dir = $$_PRO_FILE_PWD_
    sub_dir ~= s,^$$re_escape($$PWD),,
    APP_BUILD_TREE = $$clean_path($$OUT_PWD)
    APP_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,,
}

isEmpty(IDE_LIBRARY_BASENAME): IDE_LIBRARY_BASENAME = lib
isEmpty(APP_OUTPUT_PATH): APP_OUTPUT_PATH = $$APP_BUILD_TREE
APP_LIBRARY_PATH      = $$APP_OUTPUT_PATH/$$IDE_LIBRARY_BASENAME
APP_PLUGIN_PATH       = $$APP_OUTPUT_PATH/plugins

APP_TRANSLATIONS_PATH = $$APP_OUTPUT_PATH/../share/translations

LIBS *= -L$$APP_LIBRARY_PATH
LIBS *= -L$$APP_PLUGIN_PATH

INCLUDEPATH += \
    $$APP_SOURCE_TREE/libs \
    $$APP_SOURCE_TREE/plugins
